#ifndef PROCEDUREINTERFACE_H
#define PROCEDUREINTERFACE_H

#include <QObject>
class QJsonObject;

typedef void (*ProcedureProc)(const QJsonObject &json, void *userData);

class ProcedureInterface
{
public:
    virtual ~ProcedureInterface() {}

    virtual QObject *getObject() = 0;
    virtual void setProcedureHook(ProcedureProc proc, void *userData) = 0;
    virtual void setImage(ushort *img, int width, int height, int bits) = 0;
    virtual ushort *getEnhancedImage(ushort *&img, int &width, int &height) = 0;
    virtual bool getBodyPartAndViewPos(QString &part, QString &pos) = 0;
    virtual bool setDoseValues(const double &kv, const double &ma, const double &ms, const double &mx) = 0;
    virtual bool getDoseValues(double &kv, double &ma, double &ms, double &mx) const = 0;
    virtual bool getWindow(double &center, double width) const = 0;
    virtual bool setWindow(const double &center, const double &width) = 0;
    virtual bool getClipRect(QRect &rect) const = 0;
    virtual bool setClipRect(const QRect &rect) = 0;
    virtual bool getTransform(bool &rl, bool &rr, bool &fh, bool &fv) const = 0;

};

#define ProcedurePlugin_iid "com.zmg.dr.plugin.procedure.v100"
Q_DECLARE_INTERFACE(ProcedureInterface, ProcedurePlugin_iid)

#endif // PROCEDUREINTERFACE_H
